const Sequelize = require('sequelize');
module.exports = function(sequelize, DataTypes) {
  return sequelize.define('D_Principal_Element', {
    ID: {
      type: DataTypes.INTEGER,
      allowNull: false,
      primaryKey: true
    },
    Sample_ID: {
      type: DataTypes.INTEGER,
      allowNull: true,
      comment: "样品ID"
    },
    Sample_Name: {
      type: DataTypes.STRING(50),
      allowNull: true,
      comment: "样品名称"
    },
    Sample_fractions: {
      type: DataTypes.STRING(50),
      allowNull: true,
      comment: "Sample fractions"
    },
    Measurement_date_time: {
      type: DataTypes.STRING(200),
      allowNull: true,
      comment: "Category"
    },
    SiO2: {
      type: DataTypes.DOUBLE,
      allowNull: true,
      comment: "SiO2(wt%)"
    },
    TiO2: {
      type: DataTypes.DOUBLE,
      allowNull: true,
      comment: "TiO2(wt%)"
    },
    Al2O3: {
      type: DataTypes.DOUBLE,
      allowNull: true,
      comment: "Al2O3(wt%)"
    },
    Fe2O3: {
      type: DataTypes.DOUBLE,
      allowNull: true,
      comment: "Fe2O3(wt%)"
    },
    Fe2O3T: {
      type: DataTypes.DOUBLE,
      allowNull: true,
      comment: "Fe2O3T(wt%)"
    },
    FeO: {
      type: DataTypes.DOUBLE,
      allowNull: true,
      comment: "FeO(wt%)"
    },
    FeOT: {
      type: DataTypes.DOUBLE,
      allowNull: true,
      comment: "FeOT(wt%)"
    },
    MnO: {
      type: DataTypes.DOUBLE,
      allowNull: true,
      comment: "MnO(wt%)"
    },
    MgO: {
      type: DataTypes.DOUBLE,
      allowNull: true,
      comment: "MgO(wt%)"
    },
    CaO: {
      type: DataTypes.DOUBLE,
      allowNull: true,
      comment: "CaO(wt%)"
    },
    Na2O: {
      type: DataTypes.DOUBLE,
      allowNull: true,
      comment: "Na2O(wt%)"
    },
    K2O: {
      type: DataTypes.DOUBLE,
      allowNull: true,
      comment: "K2O(wt%)"
    },
    P2O5: {
      type: DataTypes.DOUBLE,
      allowNull: true,
      comment: "P2O5(wt%)"
    },
    H2O: {
      type: DataTypes.DOUBLE,
      allowNull: true,
      comment: "H2O(wt%)"
    },
    H2O_bound_water: {
      type: DataTypes.DOUBLE,
      allowNull: true,
      comment: "H2O+(wt%)"
    },
    H2O_moisture_water: {
      type: DataTypes.DOUBLE,
      allowNull: true,
      comment: "H2O-(wt%)"
    },
    CO2: {
      type: DataTypes.DOUBLE,
      allowNull: true,
      comment: "CO2(wt%)"
    },
    SO3: {
      type: DataTypes.DOUBLE,
      allowNull: true,
      comment: "SO3(wt%)"
    },
    SO2: {
      type: DataTypes.DOUBLE,
      allowNull: true,
      comment: "SO2(wt%)"
    },
    LOI_loss_on_ignition: {
      type: DataTypes.DOUBLE,
      allowNull: true,
      comment: "LOI(wt%)"
    },
    F: {
      type: DataTypes.DOUBLE,
      allowNull: true,
      comment: "F(wt%)"
    },
    Cl: {
      type: DataTypes.DOUBLE,
      allowNull: true,
      comment: "Cl(wt%)"
    },
    Total: {
      type: DataTypes.DOUBLE,
      allowNull: true,
      comment: "Total(wt%)"
    },
    Cr2O3: {
      type: DataTypes.DOUBLE,
      allowNull: true,
      comment: "Cr2O3(wt%)"
    },
    NiO: {
      type: DataTypes.DOUBLE,
      allowNull: true,
      comment: "NiO(wt%)"
    },
    La2O3: {
      type: DataTypes.DOUBLE,
      allowNull: true,
      comment: "La2O3(wt%)"
    },
    Ce2O3: {
      type: DataTypes.DOUBLE,
      allowNull: true,
      comment: "Ce2O3(wt%)"
    },
    Pr2O3: {
      type: DataTypes.DOUBLE,
      allowNull: true,
      comment: "Pr2O3(wt%)"
    },
    Nd2O3: {
      type: DataTypes.DOUBLE,
      allowNull: true,
      comment: "Nd2O3(wt%)"
    },
    Sm2O3: {
      type: DataTypes.DOUBLE,
      allowNull: true,
      comment: "Sm2O3(wt%)"
    },
    Eu2O3: {
      type: DataTypes.DOUBLE,
      allowNull: true,
      comment: "Eu2O3(wt%)"
    },
    Gd2O3: {
      type: DataTypes.DOUBLE,
      allowNull: true,
      comment: "Gd2O3(wt%)"
    },
    Tb2O3: {
      type: DataTypes.DOUBLE,
      allowNull: true,
      comment: "Tb2O3(wt%)"
    },
    Dy2O3: {
      type: DataTypes.DOUBLE,
      allowNull: true,
      comment: "Dy2O3(wt%)"
    },
    Ho2O3: {
      type: DataTypes.DOUBLE,
      allowNull: true,
      comment: "Ho2O3(wt%)"
    },
    Er2O3: {
      type: DataTypes.DOUBLE,
      allowNull: true,
      comment: "Er2O3(wt%)"
    },
    Tm2O3: {
      type: DataTypes.DOUBLE,
      allowNull: true,
      comment: "Tm2O3(wt%)"
    },
    Yb2O3: {
      type: DataTypes.DOUBLE,
      allowNull: true,
      comment: "Yb2O3(wt%)"
    },
    Lu2O3: {
      type: DataTypes.DOUBLE,
      allowNull: true,
      comment: "Lu2O3(wt%)"
    },
    Y2O3: {
      type: DataTypes.DOUBLE,
      allowNull: true,
      comment: "Y2O3(wt%)"
    },
    UO2: {
      type: DataTypes.DOUBLE,
      allowNull: true,
      comment: "UO2(wt%)"
    },
    ThO2: {
      type: DataTypes.DOUBLE,
      allowNull: true,
      comment: "ThO2(wt%)"
    },
    PbO: {
      type: DataTypes.DOUBLE,
      allowNull: true,
      comment: "PbO(wt%)"
    },
    Li2O: {
      type: DataTypes.DOUBLE,
      allowNull: true,
      comment: "Li2O(wt%)"
    },
    Rb2O: {
      type: DataTypes.DOUBLE,
      allowNull: true,
      comment: "Rb2O(wt%)"
    },
    Cs2O: {
      type: DataTypes.DOUBLE,
      allowNull: true,
      comment: "Cs2O(wt%)"
    },
    BeO: {
      type: DataTypes.DOUBLE,
      allowNull: true,
      comment: "BeO(wt%)"
    },
    SrO: {
      type: DataTypes.DOUBLE,
      allowNull: true,
      comment: "SrO(wt%)"
    },
    BaO: {
      type: DataTypes.DOUBLE,
      allowNull: true,
      comment: "BaO(wt%)"
    },
    B2O3: {
      type: DataTypes.DOUBLE,
      allowNull: true,
      comment: "B2O3(wt%)"
    },
    In2O3: {
      type: DataTypes.DOUBLE,
      allowNull: true,
      comment: "In2O3(wt%)"
    },
    SnO2: {
      type: DataTypes.DOUBLE,
      allowNull: true,
      comment: "SnO2(wt%)"
    },
    As2O3: {
      type: DataTypes.DOUBLE,
      allowNull: true,
      comment: "As2O3(wt%)"
    },
    Sb2O3: {
      type: DataTypes.DOUBLE,
      allowNull: true,
      comment: "Sb2O3(wt%)"
    },
    Bi2O3: {
      type: DataTypes.DOUBLE,
      allowNull: true,
      comment: "Bi2O3(wt%)"
    },
    Sc2O3: {
      type: DataTypes.DOUBLE,
      allowNull: true,
      comment: "Sc2O3(wt%)"
    },
    ZrO2: {
      type: DataTypes.DOUBLE,
      allowNull: true,
      comment: "ZrO2(wt%)"
    },
    HfO2: {
      type: DataTypes.DOUBLE,
      allowNull: true,
      comment: "HfO2(wt%)"
    },
    V2O3: {
      type: DataTypes.DOUBLE,
      allowNull: true,
      comment: "V2O3(wt%)"
    },
    V2O5: {
      type: DataTypes.DOUBLE,
      allowNull: true,
      comment: "V2O5(wt%)"
    },
    Nb2O5: {
      type: DataTypes.DOUBLE,
      allowNull: true,
      comment: "Nb2O5(wt%)"
    },
    Ta2O5: {
      type: DataTypes.DOUBLE,
      allowNull: true,
      comment: "Ta2O5(wt%)"
    },
    MoO3: {
      type: DataTypes.DOUBLE,
      allowNull: true,
      comment: "MoO3(wt%)"
    },
    WO3: {
      type: DataTypes.DOUBLE,
      allowNull: true,
      comment: "WO3(wt%)"
    },
    CuO: {
      type: DataTypes.DOUBLE,
      allowNull: true,
      comment: "CuO(wt%)"
    },
    Ag2O3: {
      type: DataTypes.DOUBLE,
      allowNull: true,
      comment: "Ag2O(wt%)"
    },
    ZnO: {
      type: DataTypes.DOUBLE,
      allowNull: true,
      comment: "ZnO(wt%)"
    },
    CdO: {
      type: DataTypes.DOUBLE,
      allowNull: true,
      comment: "CdO(wt%)"
    },
    remarks: {
      type: DataTypes.STRING(200),
      allowNull: true,
      comment: "备注"
    },
    OrderNo: {
      type: DataTypes.INTEGER,
      allowNull: true,
      comment: "排序"
    },
    status: {
      type: DataTypes.INTEGER,
      allowNull: true,
      comment: "是否启用"
    },
    CreateID: {
      type: DataTypes.INTEGER,
      allowNull: true,
      comment: "创建人ID"
    },
    Creator: {
      type: DataTypes.STRING(50),
      allowNull: true,
      comment: "创建人"
    },
    CreateDate: {
      type: DataTypes.DATE,
      allowNull: true,
      comment: "创建时间"
    },
    ModifyID: {
      type: DataTypes.INTEGER,
      allowNull: true,
      comment: "修改人ID"
    },
    Modifier: {
      type: DataTypes.STRING(50),
      allowNull: true,
      comment: "修改人"
    },
    ModifyDate: {
      type: DataTypes.DATE,
      allowNull: true,
      comment: "修改时间"
    }
  }, {
    sequelize,
    tableName: 'D_Principal_Element',
    schema: 'public',
    timestamps: false,
    indexes: [
      {
        name: "D_Principal_Element_ID_idx",
        fields: [
          { name: "ID" },
        ]
      },
      {
        name: "D_Principal_Element_Sample_ID_idx",
        fields: [
          { name: "Sample_ID" },
        ]
      },
      {
        name: "D_Principal_Element_pkey",
        unique: true,
        fields: [
          { name: "ID" },
        ]
      },
    ]
  });
};
